package com.rpp.es.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;

@Data
@Document(indexName = "position")
public class Position implements Serializable {

    //主键
    private String id;

    private Double companyId;

    //公司名称
    private String companyName;

    //职位名称
    private String positionName;

    //职位诱惑
    private String positionAdvantage;

    //薪资
    private String salary;

    //薪资下限
    private Double salaryMin;

    //薪资上限
    private Double salaryMax;

    private Double salaryMonth;

    //学历
    private String education;
    //工作年限
    private String workYear;
    //工作模式
    private String jobNature;
    private String chargeField;

    //创建时间
    @Field(type = FieldType.Date, store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private String createTime;

    private String email;
    //发布时间
    private String publishTime;
    private Double isEnable;
    private Double isIndex;
    //工作城市
    private String city;
    private Double orderby;
    private Double isAdvice;
    private Double showorder;
    private Double publishUserId;
    //工作地点
    private String workAddress;

    @Field(type = FieldType.Date, store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private String generateTime;

    @Field(type = FieldType.Date, store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private String bornTime;

    private Double isReward;
    private String rewardMoney;
    private Double isExpired;
    private Double positionDetailPV;

    @Field(type = FieldType.Date, store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private String offlineTime;

    private Double positionDetailPV_cnbeta;

    @Field(type = FieldType.Date, store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private String adviceTime;

    private String comeFrom;
    private Double receivedResumeCount;
    private Double refuseResumeCount;
    private Double markCanInterviewCount;
    private Double haveNoticeInterCount;
    private Double isForbidden;
    private String reason;

    @Field(type = FieldType.Date, store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private String verifyTime;

    private Double adWord;
    private String adRankAndTime;
    private Double adTimes;

    @Field(type = FieldType.Date, store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private String adStartTime;

    @Field(type = FieldType.Date, store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private String adEndTime;

    private Double adBeforeDetailPV;
    private Double adAfterDetailPV;
    private Double adBeforeReceivedCount;
    private Double adAfterReceivedCount;
    private Double adjustScore;

    @Field(type = FieldType.Date, store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private String weightStartTime;

    @Field(type = FieldType.Date, store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private String weightEndTime;

    private Byte isForward;
    private String forwardEmail;
    private Byte isSchoolJob;
    private Integer type;

    @Field(type = FieldType.Date, store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private String prolong_offline_time;
}
